package com.ofek.applicationbase.utils;

import java.lang.reflect.Field;

public class ReflectionsUtils {

	public static Field getField(Class<? extends Object> class1,
			String fieldName) {
		Field declaredField = null;
		try {
			declaredField = class1.getDeclaredField(fieldName);
		} catch (NoSuchFieldException e) {
			Class<?> superclass = class1.getSuperclass();
			return superclass!=null ? getField(superclass,fieldName) : null;
		}
		return declaredField;
		
	}

}
